From 84a672d6b63122b9732bc826d92a47bae97f2b25 Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Wed, 9 Oct 2024 15:40:32 -0400
Subject: Fix up on-navigation data loading

Maybe this isn't ideal, but whatever.
---
 hi-ui/src/routes/(app)/ch/[channel]/+page.svelte | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'hi-ui/src/routes/(app)/ch/[channel]/+page.svelte')

diff --git a/hi-ui/src/routes/(app)/ch/[channel]/+page.svelte b/hi-ui/src/routes/(app)/ch/[channel]/+page.svelte
index 26b493e..ef439d0 100644
--- a/hi-ui/src/routes/(app)/ch/[channel]/+page.svelte
+++ b/hi-ui/src/routes/(app)/ch/[channel]/+page.svelte
@@ -1,5 +1,17 @@
 <script>
+    import { afterNavigate } from '$app/navigation';
+    import { page } from '$app/stores';
+
+    import { activeChannel } from '$lib/store';
     import ActiveChannel from '$lib/components/ActiveChannel.svelte';
+
+    afterNavigate(async () => {
+        let { channel } = $page.params;
+        activeChannel.update((value) => {
+            value.set(channel)
+            return value;
+        });
+    });
 </script>
 
 <ActiveChannel />
-- 
cgit v1.2.3

